accessibility
Macromedia Logo Upper Navigation Bar
 Help
Lower Navigation Bar
ProductsSupportDesigner DeveloperDownloadsStoreInternationalSite MapCompany
Home > Products > Dreamweaver > Support > TechNote Index
Macromedia Dreamweaver Support Center - TechNote

Using a Flash object to submit a form

Product: Dreamweaver
Platform: All
Versions: 4.0 and above
ID: 16097
How useful was this document?
less more

1

2

3

4

5

How can the document be improved? (300 characters or less - you will not receive a reply.)

Two standard form objects used to submit a form are the submit Button and the Image Field. (Choose Insert > Form Objects to access these options). You also have another option in Macromedia Dreamweaver to submit your form—a Flash object. Simply by entering a JavaScript PseudoURL as the Flash object's link information, you can use either a Flash Text object or a Flash Button to do the job. The steps to accomplish this are outlined below.

Note: This method requires browser support of JavaScript pseudo-URLs in SWF files. Although this technique will work well with most newer browsers and operating systems, it will not work with some older systems or browsers. For more information about which Flash features are supported by the various browsers, consult A comprehensive list of supported Flash features, specific to each browser (TechNote 14159).

Inserting the Flash object into a form
1

Open the page which has a form. Select the form by clicking within the red dashed box or by clicking <form> in the Tag selector in the lower left-hand area of the Document window.

2 With the form selected, name the form by entering a name in the FormName text box on the Property inspector.
3 Click in the desired location in the form to establish an insertion point.
4

To insert a Flash object, choose Interactive Images > Flash Button or Flash text. This will open a dialog box for the Flash object.

5 In the dialog box, select the desired button or text style. Enter the other setting for your Flash object on the dialog box (except for the Link information).
6

Type the following code to the Link text box on the dialog box:

javascript: document.myFormName.submit();

Replace myFormName with the name given to the form in Step 2.

Note: If you plan to use a custom Flash object that is not generated by Dreamweaver, add the GetURL action in Macromedia Flash and enter the code in the URL field.

Note: Submitting a form using a Flash object bypasses the Validate Form behavior when the onSubmit event is used.

Additional information
For more information about customizing a submit button, see How to customize a Submit button (TechNote 15341).



Last updated: October 29, 2002
Keywords: Flash, form, button, submit
Created: December 4, 2001
©1995-2002 Macromedia, Inc. All rights reserved.
Use of this website signifies your agreement to the Terms of Use.
Privacy | Site Map
| Contact us | Accessibility | Report Piracy